/*
 * BlackjackCard.cpp
 *
 *  Created on: Jul 2, 2012
 *      Author: Admin
 */

#include "BlackjackCard.h"

int BlackjackCard::getCardValue() const
{
	return cardValue;
}

void BlackjackCard::setCardValue(int currentScore)
{
	if (this->cardType == "Ace"){
		if (currentScore>10){
			this->cardValue = 1;
		}
		else {
			this->cardValue = 11;
		}
	}
	else if (this->cardType == "2"){
		this->cardValue = 2;
	}
	else if (this->cardType == "3"){
		this->cardValue = 3;
	}
	else if (this->cardType == "4"){
		this->cardValue = 4;
	}
	else if (this->cardType == "5"){
		this->cardValue = 5;
	}
	else if (this->cardType == "6"){
		this->cardValue = 6;
	}
	else if (this->cardType == "7"){
		this->cardValue = 7;
	}
	else if (this->cardType == "8"){
		this->cardValue = 8;
	}
	else if (this->cardType == "9"){
		this->cardValue = 9;
	}
	else if (this->cardType == "10"){
		this->cardValue = 10;
	}
	else if (this->cardType == "Jack"){
		this->cardValue = 10;
	}
	else if (this->cardType == "Queen"){
		this->cardValue = 10;
	}
	else if (this->cardType == "King"){
		this->cardValue = 10;
	}
}

BlackjackCard::BlackjackCard() {
	// TODO Auto-generated constructor stub

}

